﻿Imports System
Imports System.Collections

Public Class LoteBE
#Region "Campos y Propiedades"
    Private _IdLote As Integer
    Private _IdSolicitud As String
    Private _Nombre As String
    Private _Estado As Boolean
    Private _FechaCreacion As DateTime
    Private _FechaModificacion As DateTime

    Private _DetalleLoteBE As New List(Of DetalleLoteBE)
    Public Property DetalleLoteBE() As List(Of DetalleLoteBE)
        Get
            Return _DetalleLoteBE
        End Get
        Set(ByVal value As List(Of DetalleLoteBE))
            _DetalleLoteBE = value
        End Set
    End Property


    Public Property IdLote() As Integer
        Get
            Return _IdLote
        End Get
        Set(ByVal value As Integer)
            _IdLote = value
        End Set
    End Property

    Public Property IdSolicitud() As Integer
        Get
            Return _IdSolicitud
        End Get
        Set(ByVal value As Integer)
            _IdSolicitud = value
        End Set
    End Property

    Public Property Nombre() As String
        Get
            Return _Nombre
        End Get
        Set(ByVal value As String)
            _Nombre = value
        End Set
    End Property

    Public Property Estado() As String
        Get
            Return _Estado
        End Get
        Set(ByVal value As String)
            _Estado = value
        End Set
    End Property

  
    Public Property FechaCreacion() As DateTime
        Get
            Return _FechaCreacion
        End Get
        Set(ByVal value As DateTime)
            _FechaModificacion = value
        End Set
    End Property

    Public Property FechaModificacion() As DateTime
        Get
            Return _FechaModificacion
        End Get
        Set(ByVal value As DateTime)
            _FechaModificacion = value
        End Set
    End Property


#End Region

#Region "Constructores"

    Public Sub New()

    End Sub

    Public Sub New(ByVal IdLote As Integer, ByVal IdSolicitud As Integer, ByVal Nombre As String, ByVal Estado As String, ByVal FechaCreacion As DateTime, ByVal FechaModificacion As DateTime)
        Me._IdLote = IdLote
        Me._IdSolicitud = IdSolicitud
        Me._Nombre = Nombre
        Me._Estado = Estado
        Me._FechaCreacion = FechaCreacion
        Me._FechaModificacion = FechaModificacion
    End Sub
#End Region
End Class


Public Class LoteBECollection
    Inherits CollectionBase

    Default Public Property Item(ByVal index As Integer) As LoteBE
        Get
            Return CType(List(index), LoteBE)
        End Get
        Set(ByVal value As LoteBE)
            List(index) = value
        End Set
    End Property

    Public Function Add(ByVal value As LoteBE) As Integer
        Return (List.Add(value))
    End Function

    Public Function IndexOf(ByVal value As LoteBE) As Integer
        Return (List.IndexOf(value))
    End Function

    Public Sub Insert(ByVal index As Integer, ByVal value As LoteBE)
        List.Insert(index, value)
    End Sub

    Public Sub Remove(ByVal value As LoteBE)
        List.Remove(value)
    End Sub

    Public Function Contains(ByVal value As LoteBE) As Boolean
        Return (List.Contains(value))
    End Function
End Class